home *** CD-ROM | disk | FTP | other *** search
/ The Fatted Calf / The Fatted Calf.iso / Applications / Graphics / GraphicsWrap / Source / CmdFgcolor.m < prev    next >
Text File  |  1991-09-16  |  629b  |  38 lines

  1.  
  2. /* Generated by Interface Builder */
  3.  
  4. #import "CmdFgcolor.h"
  5. #import "miscutil.h"
  6.  
  7. @implementation CmdFgcolor
  8. - initCmd:(int)r :(int)g :(int)b
  9. {
  10.   [super init];
  11.   color=NXConvertRGBToColor(bytetofloat(r), bytetofloat(g), bytetofloat(b));
  12.   number1=r;
  13.   number2=g;
  14.   number3=b;
  15.   command="fgcolor";
  16.   return self;
  17. }
  18.  
  19. - initCmdColor:(NXColor)aColor
  20. {
  21.   [super init];
  22.   color=aColor;
  23.   number1=floattobyte(NXRedComponent(aColor));
  24.   number2=floattobyte(NXGreenComponent(aColor));
  25.   number3=floattobyte(NXBlueComponent(aColor));
  26.   command="fgcolor";
  27.   return self;
  28. }
  29.  
  30. - doCmd
  31. {
  32.   [theBitmap setColor:color];
  33.   return self;
  34. }
  35.  
  36.  
  37. @end
  38.